import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import store from './redux/store'

ReactDOM.render(<App/> , document.getElementById('root'));

//store对象上有一个subscribe的方法，当store的状态一旦发生改变，则立马调用回调函数
store.subscribe(()=>{
    ReactDOM.render(<App/> , document.getElementById('root'));
})